package com.wsz.user.controller;

import com.wsz.pojo.R;
import com.wsz.pojo.dto.MoveDto;
import com.wsz.user.service.ReceiveBotMoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ReceiveBotMoveController {


    @Autowired
    private ReceiveBotMoveService receiveBotMoveService;

    @PostMapping("/move/bot")
    public R botMove(@RequestBody MoveDto moveDto){
        receiveBotMoveService.receiveBotMove(moveDto.getUserId(),moveDto.getDirection());
        return R.ok();
    }
}
